<template>
<div>
<h1>我是孙尚香2号</h1>
 我的的年龄-{{age}}
    过去的年龄:{{oldAge}}
    现在的年龄:{{nowAge}}
    </div>
</template>

<script>
export default{
    data(){
        return{
            age:this.$route.query.age,
            oldAge:'',
            nowAge:'',
    
        }
    },
    watch:{
         age:{
            handler:function(nowAge,oldAge){
            this.oldAge = oldAge;
            this.nowAge = nowAge;
             
        },
        immediate: true
        
        }
    }
}
</script>